package day03;

public class OperDemo1 {
    public static void main(String[] args) {
        //算数运算符+,-，*,/,%,++,--
        //++单独用,前后都一样
        int a=5;
        int b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println("——————————————————————————————————");
        // ++被使用，a++的值为a，++a的值为a+1
        int x=5;
        int y=5;
        int i=x++;
        int j=++y;
        System.out.println(x);
        System.out.println(y);
        System.out.println(i);
        System.out.println(j);
        System.out.println("——————————————————————————————————");

        int c=5;
        int d=5;
        c--;
        --d;
        System.out.println(c);
        System.out.println(d);
        System.out.println("——————————————————————————————————");
        int e=c--;
        int f=--d;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);
    }
}
